import { httpGet, httpPost, httpPut, httpDelete } from '@/utils/http'

/**
 * 获取轮播图列表
 * @param {*} params
 */
export const bannerListApi = (params) => {
  return httpGet('/api/admin/carousel', params)
}

/**
 * 添加轮播图
 * @param {*} params
 */
export const addBannerApi = (params) => {
  return httpPost('/api/admin/carousel', params)
}

/**
 * 删除轮播图
 * @param carousel_id
 */
export const deleteBannerApi = (params) => {
  return httpDelete('/api/admin/carousel', params)
}

/**
 * 更新轮播图
 * @param {*} params
 */
export const updateBannerApi = (params) => {
  return httpPut('/api/admin/carousel', params)
}

/**
 * 获取创建中加思培列表
 */
export const globalListApi = (params) => {
  return httpGet('/api/admin/select_global', params)
}

/**
 * 新增创建中加思培
 * @param select_global_url
 * @param select_global_title
 * @param select_global_content
 */
export const addGlobalApi = (params) => {
  return httpPost('/api/admin/select_global', params)
}

/**
 * 更新创建中加思培
 * @param select_global_id
 * @param select_global_url
 * @param select_global_title
 * @param select_global_content
 */
export const updateGlobalApi = (params) => {
  return httpPut('/api/admin/select_global', params)
}

/**
 * 删除创建中加思培
 * @param select_global_id
 */
export const deleteGlobalApi = (params) => {
  return httpDelete('/api/admin/select_global', params)
}

/**
 * 获取预约列表
 */
export const appointmentListApi = (params) => {
  return httpGet('/api/admin/appointment', params)
}

/**
 * 更新预约列表
 * @param appointment_id
 * @param is_deal 是否处理 0.否 1.是
 */
export const updateAppointmentApi = (params) => {
  return httpPut('/api/admin/appointment', params)
}
